// CFont.h -- class for loading a font texture image and printing text with it
// * uses CTgaLoader files for loading a tga
// ** GL_TEXTURE_2D needs to be enabled
#ifndef CFONT_H_
#define CFONT_H_

#include <cstdlib>
#include <GL/glut.h>
#include <cstdarg>
#include "CTgaLoader.h"
using namespace std;

class CFont {
private:
   CTGALoader font_texture;
   unsigned char_length;
   GLuint font;				// used for display lists
public:
   CFont();
   bool generateFont(char * pFile, unsigned int & texture_id, int texture_length, int char_length);
   void glPrint(int x, int y, char * fmt, ...);

   unsigned getCharLength() {return char_length;}
   ~CFont();
};

#endif
